﻿/*
 * Copyright © 2020, Wuxi Safover Intelligent Technology Co., Ltd. All rights reserved.
 * 
 * 无锡安永智能科技有限公司版权所有，未经许可，不得用于商业用途
 * 
 * Visit: https://www.safover.com/ 
 */

namespace Safover.LidarCollector.Models
{
    public class OthersConfig
    {
        public static string JsonFileName => $"OthersConfig.json";

        /// <summary>
        /// 是否将扫描数据保存到数据库
        /// </summary>
        public bool SaveToDB { get; set; }

        /// <summary>
        /// 是否将扫描数据保存到文件
        /// </summary>
        public bool SaveToFile { get; set; } = true;

        public string DataRootFolder { get; set; } = "C:\\MPLdata";

        public string PictureFilePath { get; set; }

        public bool UseSubBaseLine { get; set; }


        public float SubBaseLineStart { get; set; }

        public float SubBaseLineEnd { get; set; } = 1234f;


        public bool UseEmptyMining { get; set; }


        public float EmptyMiningDistance { get; set; }// = 4321f;

        public double DefaultLatitude { get; set; }// = 40.047954;

        public double DefaultLongitude { get; set; }// = 116.425415;

        public double DefaultAltitude { get; set; }

        public string StationName { get; set; }

        public string StationNameEN { get; set; }

        public string StationId { get; set; }

        public string StationAbbreviation { get; set; }

        public string FileExtension { get; set; } = "MPL";

        public override string ToString()
        {
            var subLine = UseSubBaseLine ? $"[{SubBaseLineStart} - {SubBaseLineEnd}];" : "";
            var distance = UseEmptyMining ? $"EmptyMiningDistance = [{EmptyMiningDistance}];" : "";

            return $"UseSubBaseLine=[{UseSubBaseLine}]; {subLine} UseEmptyMining=[{UseEmptyMining}]; {distance}";
        }

    }
}
